﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExtentionsForIEnumerable
{
    class ExtentionsIEnumerableTest
    {
        static void Main(string[] args)
        {
            double[] myList = {4, 1, 2, 3, 4, 5 };
            decimal sum = myList.SumElements<double>();
            Console.WriteLine("Sum of collection is : {0}",myList.SumElements());
            Console.WriteLine("Min element is : {0}", myList.MinElement());
            Console.WriteLine("Max element is : {0}", myList.MaxElement());
            Console.WriteLine("Average of collection is : {0}", myList.AverageOfCollection());
            List<double> newList = new List<double>();
            //Console.WriteLine(newList.AverageOfCollection());
        }
    }
}
